package top.mayyd.productfeignconsumer.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import top.mayyd.producteurekaservice.domain.Product;

@FeignClient(value = "product-eureka-service", fallback = ProductClientFallBack.class)
public interface ProductClient {
    @GetMapping(value = "product/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
    public Product queryById(@PathVariable("id") Long id);
}
